import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.nextLine();
        int ret=word.lastIndexOf(" ");
        String sub = word.substring(ret+1);
        System.out.println(sub.length());
    }

    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.nextLine();
        String[] words=word.split(" ");
        int count=words[words.length-1].length();
        System.out.println(count);
    }
}
